<template>
  <div class="bar">
    <Row>
      <Col span="16">状态：{{this.$store.state.StatusMsg}}</Col>
      <Col span="8" class="ver">版本号：{{version}}</Col>
    </Row>
  </div>
</template>

<script>
  import {remote} from 'electron'

  const app = remote.app
  export default {
    name: 'statusBar',
    data() {
      return {
        version: ''
      }
    },
    created() {
      this.getVersion()
    },
    methods: {
      getVersion() {
        this.version = app.getVersion() || '0.0.0'
      }
    }
  }
</script>

<style scoped lang="stylus">
  .bar
    background #f5f7f9
    padding 5px 10px
    border-top 1px solid #d7dde4
    .ver
      text-align right
</style>
